home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 8: LINUX Games
/
Linux Cubed Series 8 - LINUX Games.iso
/
games
/
doom
/
doom_16t.3
/
doom_16t
/
sndcvt
/
sdoom
< prev
next >
Wrap
Text File
|
1995-01-16
|
1KB
|
73 lines
#!/bin/sh
#
# DOOM startup script Charles (int@link.xs4all.nl)
#
doomdir=~/.doom
doomsndserver=/usr/games/bin/sndserver
DOOMWADDIR=/usr/games/lib/doom
prgname=`basename $0`
args=$*
newargs=""
create_doom_dir()
{
if type getkeys &> /dev/null
then
echo -n "$prgname: $doomdir does not exist! create it? "; ch=`getkeys yn`
echo ""
if [ "$ch" = "n" ]; then exit 1; fi
fi
mkdir $doomdir || (echo "$prgname: failed to create $doomdir"; exit 1)
echo "$prgname: created $doomdir"
}
#
# expand filenames after -file to the full pathname
#
process_cmdline()
{
while [ "$1" != "" ];
do
newargs="$newargs $1"
if [ "$1" = "-file" ] || [ "$1" = "-playdemo" ]
then
while [ "$1" != "" ];
do
shift
case $1 in
-*)
break;;
"")
return;;
/*)
newargs="$newargs $1"
;;
*)
newargs="$newargs `pwd`/$1"
;;
esac
done
else
shift
fi
done
}
if [ ! -x $doomdir ]; then create_doom_dir; fi
process_cmdline $args
cd $doomdir || (echo "$prgname: can't cd to $doomdir"; exit 1)
ln -sf $doomsndserver .
sndcvt -s &
exec linuxsdoom $newargs #< /dev/null